package templa

import (
	"github.com/go-fuego/fuego/examples/full-app-gourmet/templa/components"
	"github.com/go-fuego/fuego/examples/full-app-gourmet/store"
)

type RecipeListProps struct {
	Recipes []store.Recipe
}

// RecipeList is unused
templ RecipeList(props RecipeListProps) {
	@page("Recipes") {
		<div class="grid gap-4 md:gap-6 grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 m-2 md:my-6">
			for _, recipe := range props.Recipes {
				@components.Card(components.CardProps{
					Title: recipe.Name,
					WhenToEat: recipe.WhenToEat,
					Link: "/recipes/" + recipe.ID,
					ImageURL: "",
					Body: recipe.Description,
				})
			}
		</div>
	}
}
